package com.safe.ly_safe.control.model;

import com.safe.ly_safe.api.ApiService;
import com.safe.ly_safe.api.RetrofitManager;
import com.safe.ly_safe.entity.BaseEntity;
import com.safe.ly_safe.utils.MyUntil;

import java.util.Map;

import okhttp3.MediaType;
import okhttp3.RequestBody;
import rx.Observable;

/**
 * @PACKAGE :com.safe.ly_safe.control.model
 * @Author : HSF
 * @Time : On 2022/4/22 15:51
 * @Description : MainModel
 */
public class MainModel {

    /**
     * 登录
     * @param mp
     * @return
     */
    public Observable<BaseEntity<String>> login(Map<String,Object> mp) {
//        return RetrofitManager.create(ApiService.class).loginMain(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),requestParams));
        return RetrofitManager.create(ApiService.class).loginMain(MyUntil.getRequestBody(mp));
    }

    /**
     * 待办列表
     * @param requestParams
     * @return
     */
//    public Observable<NeedToDuEntity> getNeedToList(String requestParams) {
//        return RetrofitManager.create(ApiService.class).getNeedToList(RequestBody.create(MediaType.parse("application/json; charset=utf-8"),requestParams));
//    }

}
